<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateConfigurationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('configuration', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->comment('创建人ID');
            $table->integer('company_id')->unique()->comment('公司ID');
            $table->string('url_name')->comment('招聘网站名称设置');
            $table->string('company_name')->default('')->comment('企业简称');
            $table->string('publicity')->default('')->comment('宣传语');
            $table->string('logo')->default('')->comment('logo地址');
            $table->string('banner')->comment('banner地址');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `configuration` comment '企业招聘网站配置'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('configuration');
    }
}
